package main

import "fmt"

type Student struct {
	name   string
	gender string
	age    int
	id     int
	score  float64
}

func (student *Student) say() string {
	return fmt.Sprintf("name=%v gender=%v age=%v id=%v score=%v\n",
		(*student).name, (*student).gender, (*student).age, (*student).id, (*student).score)
}

type Dog struct {
	name   string
	age    int
	weight float64
}

func (dog *Dog) dogSay() string {
	return fmt.Sprintf("name=%v age=%v weight=%v\n", (*dog).name, (*dog).age, (*dog).weight)
}

func main() {
	student := Student{"tom", "male", 18, 005, 94.5}
	say := (&student).say()
	fmt.Println(say)

	var dog Dog = Dog{
		name:   "teddy",
		age:    3,
		weight: 3.8,
	}

	doginfo := (&dog).dogSay()
	fmt.Println(doginfo)
}
